<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>问卷答卷列表</title>
	
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/default.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui/themes/icon.css" />
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/common/Date.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/page/questionnaire/questionnaireAnswerList.js"></script>
    
    
    <script type="text/javascript">
    $(function(){

    	//构建答卷列表
    	$("#gridQuestionnaireAnswer").datagrid({
    	    width: "100%",
    	    height: 'auto',
    	    url: "../questionnaire/answer/list?questionnaireType="+"${questionnaireType }",
    	    method: 'get',
    	    loadMsg: "数据加载中...",
    	    pagination:true,
    	    pageSize: 18,//每页显示的记录条数，默认为10
    	    pageList:[18,20,30],//每页显示几条记录
    	    striped: true,
    	    singleSelect:true,
    	    toolbar:"#tbQuestionnaireAnswer"
    	});
    	
    	//病史答卷默认查当天
    	if("${questionnaireType }"=="0")
    	{
    		var today=new Date();
       	    var todayS=today.format('yyyy-MM-dd');
       	    $("#txtAnswerDateStart").datebox('setValue',todayS);
       	    $("#txtAnswerDateEnd").datebox('setValue',todayS);
    	}
   	
    });

    </script>
</head>
<body>

<table id="gridQuestionnaireAnswer" >
	<thead>
		<tr>
			<th data-options="field:'title',width:180">问卷标题</th>
			<th data-options="field:'patientName',width:100">患者</th>
			<th data-options="field:'answerDate',width:140" align="center">作答时间</th>
			<th data-options="field:'id',width:80,formatter:optColumn" align="center">详细</th>
		</tr>
	</thead>
</table>

<!-- 工具栏-start -->
<div id="tbQuestionnaireAnswer" style="padding:5px;height:auto">
	<div style="margin-bottom:5px">
		<input class="easyui-textbox" id="txtPatientName" style="width:120px" data-options="prompt:'请输入患者姓名'" />
		提交时间：
		<input id="txtAnswerDateStart" type="text" class="easyui-datebox" style="width: 100px;"/> -
		<input id="txtAnswerDateEnd" type="text" class="easyui-datebox"  style="width: 100px;"/> 
		<a href="javascript:searchQuestionnaireAnswer();" class="easyui-linkbutton" data-options="iconCls:'icon-search'" >查询</a>
	</div>
</div>
<!-- 工具栏-end -->

</body>
</html>